<?php
include("def.php");
$mysql_link = mysql_connect( $host, $mysql_user, $mysql_password ) or die('Could not connect: ' . mysql_error());
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");
$mysql_db = mysql_select_db( $mysql_database ) or die('Could not select database');

//
function sql_getCount($table, $cond)
{
	$sql = "select count(*) as tmp from $table where $cond";
	$result = mysql_query( $sql );
	$row = mysql_fetch_assoc($result);
	return $row["tmp"];
}
?>